package com.advertisementsystem.Mapper;

import com.advertisementsystem.MessageStatus;
import com.advertisementsystem.entity.ChatMessages;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface ChatMessagesMapper extends BaseMapper<ChatMessages> {

    List<ChatMessages> findByNegotiationIdOrderByCreatedTimeDesc(Long negotiationId);

    void updateStatus(String messageId, MessageStatus messageStatus);

    ChatMessages findById(String messageId);


}
